<!-- Copyright (c) Microsoft Corporation.  All rights reserved. -->

<Window x:Class="Microsoft.WindowsAPICodePack.Samples.SearchApp.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:l="clr-namespace:Microsoft.WindowsAPICodePack.Samples.SearchApp"
    xmlns:EB="clr-namespace:Microsoft.WindowsAPICodePack.Controls.WindowsPresentationFoundation;assembly=Microsoft.WindowsAPICodePack.Shell"
    Title="Search App" Height="670" Width="796.25"
	SizeToContent="WidthAndHeight" 
    Closed="Window_Closed"
    Icon="/SearchApp;component/Images/Find_Search.ico" WindowStartupLocation="CenterScreen">

    <Window.InputBindings>
        <KeyBinding Gesture="Control+E" Command="l:CustomCommands.SearchCommand"/>
    </Window.InputBindings>
    <Window.CommandBindings>
        <CommandBinding Command="l:CustomCommands.SearchCommand" Executed="CommandBinding_Executed"/>
    </Window.CommandBindings>

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Themes\GlassButton.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>


    <Grid x:Name="DocumentRoot" Width="700" Height="600">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="87" />
            <RowDefinition Height="513" />
        </Grid.RowDefinitions>
        <Image HorizontalAlignment="Left" Name="image1" 
               Stretch="Fill" 
               Source="/SearchApp;component/Images/Find_Search_64.png" Width="64" Height="64" Margin="9,2.727,0,4.273" />
        <Label Name="label1" FontStyle="Normal" FontSize="25" FontWeight="Bold" FontFamily="Segoe Script" Margin="81,14,0,28" HorizontalAlignment="Left" Width="197">Search App</Label>

        <l:SearchTextBox x:Name="SearchBox" SearchMode="Delayed" SearchEventTimeDelay="00:00:01" Margin="349,9,172,0" Search="SearchTextBox_Search" Height="21.543" VerticalAlignment="Top" />



        <StackPanel Grid.Row="1" Orientation="Vertical">
            <ListView Name="listView1" Height="388">
                <ListView.View>
                    <l:ImageView />
                </ListView.View>
            </ListView>

            <WrapPanel Height="100" Width="702" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">

                <StackPanel Orientation="Horizontal" Width="332">
                    <Label Content="Authors: " HorizontalAlignment="Center" VerticalAlignment="Center" Width="125" FontWeight="Bold" />
                    <ListBox Width="180" 
                             ItemsSource="{Binding ElementName=listView1, Path=SelectedItem.Authors}" 
                             BorderThickness="0" 
                             VerticalContentAlignment="Center" 
                             Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center" />
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="40,0,0,0">
                    <Label Content="Rating: " HorizontalAlignment="Center" VerticalAlignment="Center" Width="125" FontWeight="Bold" />
                    <l:RatingControl Width="87" 
                                         Height="15" 
                                         RatingValue="{Binding ElementName=listView1, Path=SelectedItem.Rating, Mode=OneWay}" 
                                         />
                </StackPanel>
                <StackPanel Orientation="Horizontal" Width="332">
                    <Label Content="Title: " HorizontalAlignment="Center" VerticalAlignment="Center" Width="125" FontWeight="Bold" />
                    <TextBlock Width="202" 
                             IsEnabled="True"
                             Text="{Binding ElementName=listView1, Path=SelectedItem.Title, Mode=OneWay}"
                             Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="40,0,0,0">
                    <Label Width="125" Content="Copyright: " VerticalAlignment="Center" FontWeight="Bold" />
                    <TextBlock Width="180" 
                             Text="{Binding ElementName=listView1, Path=SelectedItem.Copyright, Mode=OneWay}" 
                             Height="26" />
                </StackPanel>

                <StackPanel Orientation="Horizontal" Width="332">
                    <Label Width="125" Content="Keywords: " VerticalAlignment="Center" FontWeight="Bold" />
                    <ListBox Width="180"
                             ItemsSource="{Binding ElementName=listView1, Path=SelectedItem.Keywords, Mode=OneWay}"
                             BorderThickness="0" 
                             VerticalContentAlignment="Center" 
                             Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center" />
                </StackPanel>

                <StackPanel Orientation="Horizontal" Margin="40,0,0,0">
                    <Label Width="125" Content="Total Pages: " VerticalAlignment="Center" FontWeight="Bold" />
                    <TextBlock Width="180" 
                             Text="{Binding ElementName=listView1, Path=SelectedItem.TotalPages, Mode=OneWay}" 
                             Height="26" IsEnabled="True"/>
                </StackPanel>

            </WrapPanel>


        </StackPanel>
        <Button Click="buttonSearchAdv_Click" HorizontalAlignment="Right" Margin="0,24,47,28" Name="buttonSearchAdv" Width="105">
            <StackPanel Orientation="Horizontal">
                <Image Source="/SearchApp;component/Images/search_adv.png" Width="32"/>
                <Label FontSize="12">Advanced...</Label>
                <Thumb Opacity="0" Background="{x:Null}" x:Name="DragThumb" />
            </StackPanel>
        </Button>
        <Button Name="HelpButton" Click="HelpButton_Click" Width="32" HorizontalAlignment="Right" Margin="0,24,10,31">
            <Image Source="/SearchApp;component/Images/Help-32.png"/>
        </Button>
        <ComboBox Height="40" Margin="349,0,172,7.773" Name="SearchScopesCombo" VerticalAlignment="Bottom" />

        <Label Height="28" Margin="261,0,0,12.273" Name="label2" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="86">Search Scope:</Label>
    </Grid>

</Window>
    